package com.dinnerorders.common.services;

import com.dinnerorders.common.models.User;

/**
 * @author Sergey Nalivko e-mail: snalivko93@gmail.com
 */
public interface UserService {
    /**
     * Saves user into database
     * @param user the user to be saved
     */
    public void save(User user);

    /**
     * Finds user in database by its ldap login
     * @param ldapLogin user's ldap login
     * @return found user in case such record exists and null otherwise
     */
    public User findUserByLdapLogin(String ldapLogin);

    /**
     * Updates information about user in database
     * @param user the user to be updated
     * @return updated user object
     */
    public User update(User user);
}
